<!DOCTYPE html>
<html lang="en">
    <head>
        <meta charset="utf-8">
        <meta http-equiv="X-UA-Compatible" content="IE=edge">
        <meta name="viewport" content="width=device-width, initial-scale=1">
        <meta name="description" content="">
        <meta name="author" content="">
        <link rel="icon" href="../../favicon.ico">
        <title><?php echo SysConfig::$OJ_NAME?>-登录</title>
        <?php include("template/bs3/css.php");?>
        <!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
        <!--[if lt IE 9]>
        <script src="http://cdn.bootcss.com/html5shiv/3.7.0/html5shiv.js"></script>
        <script src="http://cdn.bootcss.com/respond.js/1.4.2/respond.min.js"></script>
        <![endif]-->
    </head>

    <body>
        <div class="container">
            <?php include("template/bs3/nav.php");?>
            <!-- Main component for a primary marketing message or call to action -->
            <div class="panel panel-default">
                <div class="panel-body">
                    <div class="col-lg-8 col-xs-12" >
                        <form id="login" action="login.php" method="post" role="form"  class="form-horizontal" onSubmit="return jsMd5();">
                            <div class="form-group">
                                <label class="col-sm-4 control-label"><?php echo $MSG_USER_ID?></label>
                                <div class="col-sm-8">
                                    <input name="user_id" class="form-control" placeholder="<?php echo $MSG_USER_ID?>" type="text">
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-sm-4 control-label"><?php echo $MSG_PASSWORD?></label>
                                <div class="col-sm-8">
                                    <input name="password" class="form-control" placeholder="<?php echo $MSG_PASSWORD?>" type="password">
                                </div>
                            </div>
                            <?php if($OJ_VCODE){?>
                                <div class="form-group">
                                    <label class="col-sm-4 control-label"><?php echo $MSG_VCODE?></label>
                                    <div class="col-sm-4">
                                        <input name="vcode" class="form-control" type="text">
                                    </div>
                                    <div class="col-sm-4">
                                        <img alt="click to change" src="vcode.php" onclick="this.src='vcode.php?'+Math.random()" height="30px">*
                                    </div>
                                </div>
                            <?php }?>
                            <div class="form-group">
                                <div class="col-sm-offset-4 col-sm-4">
                                    <button type="submit" class="btn btn-default btn-block" ><?php echo $MSG_LOGIN; ?></button>
                                </div>
                                <div class="col-sm-4">
                                    <a class="btn btn-default btn-block" href="#"><?php echo $MSG_LOST_PASSWORD; ?></a>
                                </div>
                            </div>
                        </form>
                    </div>
                    <a target="_blank" href="<?php echo SysConfig::$WECHAT_URL;?>">
                        <img class="col-lg-4 col-xs-12" src="/upload/weixin.gif">
                    </a>
                </div>
        </div>
        <script src="include/md5-min.js"></script>
            <script>
                function jsMd5(){
                    var passwd = $("input[name=password]").val();
                    if(passwd=="") {
                        return false;
                    }
                    $("input[name=password]").val(hex_md5(passwd));
                    return true;
                }
            </script>
        </div> <!-- /container -->
        <!-- Bootstrap core JavaScript
        <!-- Placed at the end of the document so the pages load faster -->
        <?php include("template/bs3/js.php");?>
    </body>
</html>
